package com.shangqing.web.controller.system;

import com.shangqing.common.core.domain.AjaxResult;
import com.shangqing.system.hightemperature.entity.HighTemperature;
import com.shangqing.system.hightemperature.service.IhighTemperatureService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/highteminformation")
@Api(tags = "高温", description = "高温相关接口")
public class HighTemInformationController {

    @Autowired
    private IhighTemperatureService ihighTemperatureService;

    @GetMapping("/selectHighTemInformation")
    @ApiOperation(value = "高温信息", notes = "", httpMethod = "GET")
    public AjaxResult selWindInformation() {
        List<HighTemperature> highTemperatures = null;
        try {
            highTemperatures = ihighTemperatureService.getAll();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return AjaxResult.success("查询成功", highTemperatures);
    }

    /*@GetMapping("/selectHighTemWarning")
    @ApiOperation(value = "高温预警信息", notes = "", httpMethod = "GET")
    public AjaxResult selHighTemWarning() {
        List<HighTemWarning> highTemWarnings = null;
        try {
            highTemWarnings = ihighTemperatureService.getHighWarning();
        } catch (Exception e) {
            e.printStackTrace();
        }
        return AjaxResult.success("查询成功", highTemWarnings);
    }*/
}
